home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-09-17 | 3.3 KB | 95 lines | [TEXT/MPS ] |
- //========================================================================================
- //
- // File: FWFctClp.h
- // Release Version: $ ODF 2 $
- //
- // Copyright: (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
- //
- //========================================================================================
- //
- // Use a FacetClipper to calculate the clip shape of embedded facets.
- //
- // Create a FW_CFacetClipper (or a subclass) on the stack or as a pointer.
- //
- // If you want to calculate the clip shape of all the embedded facets of a presentation
- // call:
- //
- // FW_CFacetClipper::Clip(Environment*, FW_CPresentation*, ODShape*);
- //
- // If you want to calculate the clip shape of the embedded facets of one frame call:
- //
- // FW_CFacetClipper::Clip(Environment*, FW_CEmbeddingFrame*, ODShape*);
- //
- // The limitShape parameter can be null. If it is not null it should be in content
- // coordinate and only embedded facets intersecting with it will be clipped.
- //
- // The default version of ClipEmbeddedFacets doesn't take into account the content
- // of your part. If your content overlaps your embedded facets you need to provide
- // your own ClipEmbeddedFacets method. If there is no interaction between your content
- // and the embedded facets this default version is fine.
- // NOTE: Your version of ClipEmbeddedFacets SHOULD NOT CALL INHERITED::ClipEmbeddedFacets.
- //
- // If you override ClipEmbeddedFacets, call ClipOneEmbeddedFacet from your own
- // ClipEmbeddedFacets method. The workingClip parameter is the clip region to apply to
- // this embedded facet. When returning from ClipOneEmbeddedFacet, the usedShape of the
- // embedded facet will have been removed from workingClip. WorkingClip is in window
- // coordinates
-
- #ifndef FWFCTCLP_H
- #define FWFCTCLP_H
-
- #ifndef FWEXCLIB_H
- #include "FWExcLib.h"
- #endif
-
- //========================================================================================
- // Forward Declarations
- //========================================================================================
-
- class FW_CPart;
- class ODShape;
- class ODFacet;
- class FW_CEmbeddingFrame;
- class FW_CPresentation;
- struct Environment;
-
- //========================================================================================
- // class FW_CFacetClipper
- //========================================================================================
-
- class FW_CFacetClipper
- {
- public:
- FW_DECLARE_AUTO(FW_CFacetClipper)
-
- //---------------------------------------------------------------------------------------
- // Initialization/Destruction
- //
- public:
- FW_CFacetClipper();
- virtual ~FW_CFacetClipper();
-
- //---------------------------------------------------------------------------------------
- // New API
- //
- public:
- virtual void Clip(Environment *ev, FW_CPresentation *presentation, ODShape* limitShape = NULL);
- virtual void Clip(Environment *ev, FW_CEmbeddingFrame *embeddingFrame, ODShape* limitShape = NULL);
-
- virtual void ClipEmbeddedFacets(Environment *ev,
- FW_CEmbeddingFrame *embeddingFrame,
- ODFacet *containingFacet,
- ODShape* limitShape);
-
- void ClipOneEmbeddedFacet(Environment *ev,
- ODFacet *embeddedFacet,
- ODShape* workingClip,
- ODShape* limitShape = NULL);
-
- ODShape* AcquireWorkingClip(Environment *ev,
- FW_CEmbeddingFrame* embeddingFrame,
- ODFacet* containingFacet);
- };
-
- #endif
-